package service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.InfoDao;
import pojo.Info;
import service.InfoManager;

@Service("manager")
public class InfoManagerImpl implements InfoManager{
	@Resource(name="infoDao")
	private InfoDao dao;

	@Override
	@Transactional
	public Info regist(Info info) {
		return dao.addInfo(info);
	}

	@Override
	@Transactional
	public Info login(String name, String pwd) {
		return dao.findInfo(name, pwd);
	}

	@Transactional
	public int update(Info info){
		return dao.update(info);
	}

}
